package com.xh3140.android.widget.chart.scales;

import java.util.List;

/**
 * 通用刻度列表，理论上可以用来构造任何刻度
 */
public class CommonAxisScales extends AxisScales {
    private final List<String> list;

    public CommonAxisScales(List<String> list) {
        super(1f, 1f, list.size(), 0, 0);
        this.list = list;
    }

    @Override
    public float getValue(int index) {
        return index + 1f;
    }

    @Override
    public String getText(int index) {
        return list.get(index);
    }
}
